package com.example.xd.Service;

import com.example.xd.DAO.userMapper;

import com.example.xd.Entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RegisterService {

    private  userMapper userMapper;
  @Autowired
    public RegisterService(userMapper userMapper) {
      this.userMapper = userMapper;
  }


  public  boolean isUserExist(User user) {
      if(userMapper.selectUserName(user.getName())>=1)
      return false;
      else return true;
  }

}
